package cn.com.dycc.notice.entity;

import java.io.Serializable;
import java.sql.Timestamp;

import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 
 * Description: 通知公告实体
 * Author: Liket
 * Version: 1.0
 * Create Date Time: 2017年10月19日 下午4:47:27.
 * Update Date Time: 
 * @see
 */
public class Message implements Serializable{

	private static final long serialVersionUID = -6481850414656920066L;
	private String message_id;	//公告ID	
	private Integer message_type;	//公告类型
	private String title;		//标题
	private String content;		//内容
	private Integer vis;        //消息顶置                  
	private Timestamp keep_date;		//保存时间
	private Timestamp auto_send_date;	//自动发送时间
	private String user_id;		//发布人ID
	private String account;		//发布人账号
	private String username;	//发布人姓名
	private Timestamp send_date;		//发送时间
	private String send_ip;		//发送IP地址
	private Integer click;		//点击次数	
	private Integer push_message;	//消息推送
	
	private String state;			//可用标识
	private String org_id;			//组织标识
	private Timestamp update_date;		//修改时间
	private String update_user_id;	//修改人ID
	public Message(){
		
	}
	public Message(String message_id, Integer message_type, String title, String content, Integer vis, Timestamp keep_date,
			Timestamp auto_send_date, String user_id, String account, String username, Timestamp send_date, String send_ip,
			Integer click, Integer push_message, String state, String org_id, Timestamp update_date, String update_user_id) {
		super();
		this.message_id = message_id;
		this.message_type = message_type;
		this.title = title;
		this.content = content;
		this.vis = vis;
		this.keep_date = keep_date;
		this.auto_send_date = auto_send_date;
		this.user_id = user_id;
		this.account = account;
		this.username = username;
		this.send_date = send_date;
		this.send_ip = send_ip;
		this.click = click;
		this.push_message = push_message;
		this.state = state;
		this.org_id = org_id;
		this.update_date = update_date;
		this.update_user_id = update_user_id;
	}
	@Override
	public String toString() {
		return "Message [message_id=" + message_id + ", message_type=" + message_type + ", title=" + title
				+ ", content=" + content + ", vis=" + vis + ", keep_date=" + keep_date + ", auto_send_date="
				+ auto_send_date + ", user_id=" + user_id + ", account=" + account + ", username=" + username
				+ ", send_date=" + send_date + ", send_ip=" + send_ip + ", click=" + click + ", push_message="
				+ push_message + ", state=" + state + ", org_id=" + org_id + ", update_date=" + update_date
				+ ", update_user_id=" + update_user_id + "]";
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((message_id == null) ? 0 : message_id.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Message other = (Message) obj;
		if (message_id == null) {
			if (other.message_id != null)
				return false;
		} else if (!message_id.equals(other.message_id))
			return false;
		return true;
	}
	public String getMessage_id() {
		return message_id;
	}
	public void setMessage_id(String message_id) {
		this.message_id = message_id;
	}
	public Integer getMessage_type() {
		return message_type;
	}
	public void setMessage_type(Integer message_type) {
		this.message_type = message_type;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public Integer getVis() {
		return vis;
	}
	public void setVis(Integer vis) {
		this.vis = vis;
	}
	
	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
	public Timestamp getKeep_date() {
		return keep_date;
	}
	public void setKeep_date(Timestamp keep_date) {
		this.keep_date = keep_date;
	}
	//@DateTimeFormat(pattern="yyyy-MM-ddHH:mm:ss") 
	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
	public Timestamp getAuto_send_date() {
		return auto_send_date;
	}
	public void setAuto_send_date(Timestamp auto_send_date) {
		this.auto_send_date = auto_send_date;
	}
	public String getUser_id() {
		return user_id;
	}
	public void setUser_id(String user_id) {
		this.user_id = user_id;
	}
	public String getAccount() {
		return account;
	}
	public void setAccount(String account) {
		this.account = account;
	}
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	//@DateTimeFormat(pattern="yyyy-MM-ddHH:mm:ss") 
	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
	public Timestamp getSend_date() {
		return send_date;
	}
	public void setSend_date(Timestamp send_date) {
		this.send_date = send_date;
	}
	public String getSend_ip() {
		return send_ip;
	}
	public void setSend_ip(String send_ip) {
		this.send_ip = send_ip;
	}
	public Integer getClick() {
		return click;
	}
	public void setClick(Integer click) {
		this.click = click;
	}
	public Integer getPush_message() {
		return push_message;
	}
	public void setPush_message(Integer push_message) {
		this.push_message = push_message;
	}
	public String getState() {
		return state;
	}
	public void setState(String state) {
		this.state = state;
	}
	public String getOrg_id() {
		return org_id;
	}
	public void setOrg_id(String org_id) {
		this.org_id = org_id;
	}
	//@DateTimeFormat(pattern="yyyy-MM-ddHH:mm:ss") 
	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
	public Timestamp getUpdate_date() {
		return update_date;
	}
	public void setUpdate_date(Timestamp update_date) {
		this.update_date = update_date;
	}
	public String getUpdate_user_id() {
		return update_user_id;
	}
	public void setUpdate_user_id(String update_user_id) {
		this.update_user_id = update_user_id;
	}	
		
}
